package com.xiaofu.datasource.config;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;
import java.sql.Connection;

/**
 * @author luofuzhou
 * @date 2024/8/23
 * @dec 描述
 */
@Configuration
public class SqlSessionFactoryConfig {

/*    @Bean
    public SqlSessionFactory sqlSessionFactoryOne(DataSource datasourceOne) throws Exception {
        SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
        factoryBean.setDataSource(datasourceOne);
        return factoryBean.getObject();
    }*/

/*    @Bean
    public SqlSessionFactory sqlSessionFactoryTwo(DataSource datasourceTwo) throws Exception {
        SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
        factoryBean.setDataSource(datasourceTwo);
        return factoryBean.getObject();
    }*/
}
